package com.cjl.learn.factory.factoryMethod.factory;

import com.cjl.learn.factory.factoryMethod.pizza.LDCheesePizza;
import com.cjl.learn.factory.factoryMethod.pizza.LDGreekPizza;
import com.cjl.learn.factory.factoryMethod.pizza.Pizza;

/**
 * Created by Enzo Cotter on 2019-08-14.
 */
public class LDPizzaFactory implements PizzaFactory {

    public Pizza createPizza(String type) {
        if ("greek".equals(type)) {
            return new LDGreekPizza(type);
        } else if ("cheese".equals(type)) {
            return new LDCheesePizza(type);
        }

        return null;
    }
}
